﻿// ***********************************************************************************************
// <summary author="bill.qian" create_date="2009/9/8" modify_date="">
//         UserControl公共基类
// </summary> 
// <modify_log>
//
// </modify_log>
// <copyright file="BaseUserControl.cs" company="DEXTRYS" url="http://www.dextrys.com">
//           新宇软件（苏州工业园区）有限公司
// </copyright>
// ***********************************************************************************************
namespace Dextrys.SharePoint
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Web;
    using System.Web.UI;
    using Microsoft.SharePoint;

    /// <summary>
    /// 为了给QuickPart提供的UserControl的基类
    /// </summary>
    public abstract class BaseUserControl : UserControl
    {
        /// <summary>
        /// 构造一个BaseUserControl的实例
        /// </summary>
        public BaseUserControl() 
            : base() 
        { 
        }

        /// <summary>
        /// 获取当前的SPWeb
        /// </summary>
        protected SPWeb Web
        {
            get
            {
                return SPContext.Current.Web;
            }
        }

        /// <summary>
        /// 获取当前用户
        /// </summary>
        protected SPUser CurrentUser
        {
            get { return SPContext.Current.Web.CurrentUser; }
        }
    }
}
